mystr = '   hello world and itcast and itheima and Python   '
print(mystr)

# 1、lstrip(): 删除左侧空白字符
new_str = mystr.lstrip() # 默认删除空白字符
print(new_str)

# 2、rstrip(): 删除右侧空白字符
new_str = mystr.rstrip()
print(new_str)

# 3、strip(): 删除两侧空白字符
new_str = mystr.strip()
print(new_str)

str1 = 'pppppiiii my name is zhao iiiiipppppipi'
new_str = str1.strip('pi')  # 删除str两侧的 字符p或i
print(new_str)

